#include "stdafx.h"
#include "BitmapTextObject.h"
#include "BMPText.h"

BitmapTextObject::BitmapTextObject()
{
	memset(m_szText, 0, sizeof(m_szText));
	strcpy(m_szText, "NOFILENAMESET");
	m_nFontID = NO_FONT;
}

BitmapTextObject::~BitmapTextObject()
{

}

void BitmapTextObject::Update(float _dt)
{

}

void BitmapTextObject::Render()
{
	//BMPText::GetInstance()->DrawBMPText(m_szText, (int)m_vPosition.x, (int)m_vPosition.y, m_nSpacing, D3DCOLOR_XRGB(255,255,255), m_fScale);
	BMPText::GetInstance()->DrawWithFont(m_nFontID, m_szText, (int)m_vPosition.x, (int)m_vPosition.y, D3DCOLOR_XRGB(255,255,255), m_fScale);
}	

void BitmapTextObject::SetText(int nFontID, char* szText, D3DXVECTOR2 vPos, float fScale, D3DXVECTOR3 vColor)
{
	m_nFontID = nFontID;
	strcpy(m_szText, szText);

	m_vPosition = vPos;
	m_vColor = vColor;
	m_fScale = fScale;
}
